package com.atxiaodei.kabudashejimoshi.责任链模式.使用建造者优化责任链模式;

import com.atxiaodei.kabudashejimoshi.责任链模式.Member;

/**
 * 登陆handler
 */
public class LoginHandler extends Handler {

    @Override
    public void doHandle(Member member) {
        if ("admin".equals(member.getLoginName()) && "123456".equals(member.getLoginPass())) {
            System.out.println("登陆成功");
        }
        member.setRoleName("admin");
        chain.doHandle(member);
    }
}
